package com.lao.demo.strategymode.service;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.bean.WxJsapiSignature;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import org.springframework.stereotype.Service;

/**
 * @Author: xuchao
 * @Description:
 * @Date: 2021/6/24 9:56
 */
@Service
@Slf4j
@AllArgsConstructor
public class JsapiFacadeImpl {

    private final WxMpService wxService;


    public WxJsapiSignature createJsapiSignature(String url) {
        try {

            return wxService.createJsapiSignature(url);
        } catch (WxErrorException e) {
            e.printStackTrace();
        }
        return null;
    }

}
